<div class="grid_7">
    <div class="box">
        <h2>
            <a href="#" id="toggle-tables">WEBSITE CONFIGURATION </a>
        </h2>
        <div class="block" >
            <form name="cat" method="POST" action="<?= base_url(); ?>admin/settings/get_setting">
                <fieldset>
                    <legend>Select Setting</legend>
                    <?php
                    if ($this->session->flashdata('message')) {
                        $msg = $this->session->flashdata('message');
                        echo '<font color="red">' . $msg . '</font>';
                    }
                    ?> 
                    <div class="field">
                        <label> Setting Name</label>
                        <select name="setting_variable" >
                            <option value="">Select Setting --></option>
                            <?php foreach ($settings as $settings): ?>
                                <option value="<?= $settings->variable; ?>"><?= $settings->description; ?></option>
                            <?php endforeach; ?>
                        </select>

                        <input type="submit" value="Get Setting" name="get_value" />
                    </div>

                </fieldset>
            </form>
        </div>
    </div> <!-- END OF BOX -->
    <?php if (isset($setting_id)) { ?>
        <div class="box">
            <h2>
                <a href="#" id="toggle-tables"><?= $setting_description; ?></a>
            </h2>

            <div class="block" >
                <fieldset>
                    <legend>Setting Data :</legend>
                    <form name="keyword" method="POST" action="<?= base_url(); ?>admin/settings/setting_update">
                        <textarea name="variable_value" cols="94%" rows="5" id="variable_value"><?= $setting_value; ?></textarea></td>
                        <input name="setting_id" type="hidden" size="0" value="<?= $setting_id; ?>" />
                        <input name="setting_variable" type="hidden" size="0" value="<?= $setting_variable; ?>" />
                        <input type="submit" name="setting_update" value="Update <?= ucfirst($setting_description); ?>" style="float:right;margin-right:30px; "/>
                    </form>
                </fieldset>
            </div>
        </div> <!-- END OF BOX -->

    <?php } ?>
</div>
